//
//  GBPingHelper.h
//  PingTest
//
//  Created by zgy on 2025/4/16.
//

#import <Foundation/Foundation.h>
#import "GBPing.h"


typedef enum : NSUInteger {
    GBPingResTypeFail,
    GBPingResTypeSend,
    GBPingResTypeFailToSend,
    GBPingResTypeTimeout,
    GBPingResTypeReceiveReply,
    GBPingResTypeUnexpectedReply,
} GBPingResType;

@interface GBPingHelper : NSObject


@property (nonatomic, strong) GBPing *ping;

+ (instancetype)ping:(NSString *)host timeout:(NSTimeInterval)timeout pingPeriod:(NSTimeInterval)pingPeriod callback:(void(^)(GBPingResType resType, GBPingSummary *pingSummary, NSError *error))callback;

@end

